/*
 * ShowTeachingPlan.java
 *
 * Created on __DATE__, __TIME__
 */

package Presentation;

import Interface_Bl.CourseBlI;
import Interface_Bl.TeachingPlanBlI;

/**
 *
 * @author  __USER__
 */
public class ShowTeachingPlanJIF extends javax.swing.JInternalFrame {
    CourseBlI courseBlI = null;
    String dep = "";
    TeachingPlanBlI teachingplanBlI=null;
	/** Creates new form ShowTeachingPlan */
	public ShowTeachingPlanJIF(CourseBlI courseBlI , String dep,TeachingPlanBlI teachingplanBlI) {
		initComponents();
		this.courseBlI = courseBlI;
		this.teachingplanBlI=teachingplanBlI;
		this.dep = dep;
		this.setLocation(400, 200);
		initial();
	}
	
	public void initial(){
		String teachingPlan = teachingplanBlI.returnTeachingPlan(dep);
		this.JTA_teachingPlan.setText(teachingPlan);
	}
	
	@Override
	public void doDefaultCloseAction() {
		// TODO Auto-generated method stub
		LoginJF.frameState.ShowTeachingPlanJIF--;
		super.doDefaultCloseAction();
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jScrollPane1 = new javax.swing.JScrollPane();
		JTA_teachingPlan = new javax.swing.JTextArea();

		setClosable(true);
		setIconifiable(true);
		setTitle("\u67e5\u770b\u9662\u7cfb\u6559\u5b66\u8ba1\u5212");

		JTA_teachingPlan.setColumns(20);
		JTA_teachingPlan.setEditable(false);
		JTA_teachingPlan.setRows(5);
		jScrollPane1.setViewportView(JTA_teachingPlan);

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 394,
				Short.MAX_VALUE));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 278,
				Short.MAX_VALUE));

		pack();
	}// </editor-fold>
	//GEN-END:initComponents

	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JTextArea JTA_teachingPlan;
	private javax.swing.JScrollPane jScrollPane1;
	// End of variables declaration//GEN-END:variables

}